#include "EpilFunctionCallExpressionCode.h"
#include "EpilOutputHelper.h"
#include "TCharSupport.h"


EpilFunctionCallExpressionCode::EpilFunctionCallExpressionCode( const EpilLexLocation & location )
: EpilFunctionCallExpressionCodeBase( location )
{
}


EpilFunctionCallExpressionCode::~EpilFunctionCallExpressionCode()
{
}


tstring EpilFunctionCallExpressionCode::ToEpilCode( int indent ) const
{
	tstringstream ret;
	ret << this->GetTableExpression()->ToEpilCode();
	if( this->GetArguments().empty() )
	{
		ret << t("()");
	}
	else
	{
		ret << t("( ");
		ret << EpilOutputHelper::GetListOutput( this->GetArguments(), t(", ") );
		ret << t(" )");
	}
	return ret.str();
}